import request from '@/utils/request'
/**
 * 
 * @returns 模拟量
 */
// 获取子索引下拉
export const getchildIndex = (type,primaryIndexId) => {
    return request({
        url: '/sensor/'+type+'/childIndexs?primaryIndexId='+primaryIndexId,
        method: 'get'
    })
}
// 传感器名称下拉
export const getsensorName = (type) => {
    return request({
        url: '/sensor/'+type+'/sensorNames',
        method: 'get'
    })
}
// 获取子索引下拉--累计量
export const getchildIndexadd = (type) => {
    return request({
        url: '/sensor/'+type+'/childIndex',
        method: 'get'
    })
}
// 传感器名称下拉--累计量
export const getsensorNameadd = (type) => {
    return request({
        url: '/sensor/'+type+'/sensorName',
        method: 'get'
    })
}
// 单位
export const getunit = (type) => {
    return request({
        url: '/sensor/'+type+'/unit',
        method: 'get'
    })
}
// 传感器编号
export const gettypeCode = () => {
    return request({
        url: '/place/type/typeCode',
        method: 'get'
    })
}
// 分站模式
export const getsubstationmodel = () => {
    return request({
        url: '/substation/model/search',
        method: 'post',
        data:{}
    })
}
// 文件上传接口
export const fileupload = (data) => {
    return request({
        url: '/common/upload',
        method: 'post',
        data:data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}
// 区域类型下拉
export const gettypeList = (data) => {
    return request({
        url: '/area/type/searchAll',
        method: 'post',
        data:{}
    })
}
// 所属区域下拉
export const getsearchTree = (data) => {
    return request({
        url: '/area/info/searchTree',
        method: 'post',
        data:{}
    })
}
// 分站类型
export const getsubstation = (data) => {
    return request({
        url: '/substation/type/search',
        method: 'post',
        data:{}
    })
}
// 分站编号
export const getstationNos = (data) => {
    return request({
        url: '/station/stationCodes',
        method: 'get'
    })
}
// 安装地点
export const getaddressInfo = (data) => {
    return request({
        url: '/place/info/addressInfo',
        method: 'post',
        data:{}
    })
}
// 地点类型
export const gettypesInfo = (data) => {
    return request({
        url: '/place/type/typesInfo',
        method: 'post',
        data:{}
    })
}
// 测点编号下拉
export const getpointCodes = (data) => {
    return request({
        url: '/point/pointCodes?stationCode='+data,
        method: 'get'
    })
}
// 传感器名称下拉
export const getpointsensor= (data) => {
    return request({
        url: '/point/sensor',
        method: 'get'
    })
}
// 区域信息
export const getinfosearchAll= (data) => {
    return request({
        url: '/area/info/searchAll',
        method: 'post',
        data:{}
    })
}
// 传感器类型
export const gettypegetSensors= (data) => {
    return request({
        url: '/place/type/getSensors',
        method: 'get'
    })
}
// 馈电测点下拉
export const getfeedList= (data) => {
    return request({
        url: '/controlPort/feedList',
        method: 'get'
    })
}
// 开出口下拉列表

export const controlPortsList= (data) => {
    return request({
        url: '/station/controlPorts?stationCode='+data,
        method: 'get'
    })
}
// 设备维检类型
export const searchEffectList= () => {
    return request({
        url: '/maintenance/time/searchEffect',
        method: 'get'
    })
}
// 设备名称
export const searchqueryAllName= () => {
    return request({
        url: '/device/maintenance/queryAllName',
        method: 'post',
        data:{}
    })
}
// 区域名称
export const searchareaTree= () => {
    return request({
        url: '/area/info/areaTree',
        method: 'post',
        data:{}
    })
}
// 设备特性筛选
export const searchqueryFeatureTree= () => {
    return request({
        url: '/point/queryFeatureTree',
        method: 'post',
        data:{}
    })
}
// 时间门限列表
export const searchgetTimeList= () => {
    return request({
        url: '/power/supply/getTimeList',
        method: 'get'
    })
}
// 容量门限列表
export const searchgetCapacityList= () => {
    return request({
        url: '/power/supply/getCapacityList',
        method: 'get'
    })
}
// 电源类型列表
export const searchgetPowerTypeList= () => {
    return request({
        url: '/power/supply/getPowerTypeList',
        method: 'get'
    })
}
// 多参测点传感器列表
export const getmultipleList= () => {
    return request({
        url: '/sensor/multiple/list',
        method: 'post',
        data:{}
    })
}
// 获取环网通道列表
export const searchchannelNoList= () => {
    return request({
        url: '/station/channelNoList',
        method: 'get'
    })
}
// 获取计算因子列表
export const searchexpressionList= () => {
    return request({
        url: '/template/expression/tree',
        method: 'get'
    })
}
// 获取模板名称列表
export const getTemplateTreeList= () => {
    return request({
        url: '/template/expression/getTemplateTree',
        method: 'get'
    })
}
// 获取测点表达式测点下拉
export const getPointIdsList= (data) => {
    return request({
        url: '/template/expression/getPointIds',
        method: 'post',
        data:data
    })
}
// 验证名称
export function validParamData(query) {
    return request({
      url: '/sensor/multiple/validParam',
      method: 'get',
      params: query
    })
  }
// 获取所有报警类型
export const getlistAlarmTypesList= (data) => {
    return request({
        url: '/measure/listAlarmTypes',
        method: 'get'
    })
}
// 获取所有分站列表
export const getlistSitesList= (data) => {
    return request({
        url: '/mutation/listSites',
        method: 'post',
        data:data
    })
}
// 获取突变报警类型
export const getlistmutationAlarmTypesList= (data) => {
    return request({
        url: '/mutation/listAlarmTypes',
        method: 'post',
        data:data
    })
}
export const getcompareTypesList= (data) => {
    return request({
        url: '/mutation/compareTypes',
        method: 'post',
        data:data
    })
}
export const getlistPointsBySensorName= (data) => {
    return request({
        url: '/gas/fire/listPointsBySensorName',
        method: 'post',
        data:data
    })
}
// 获取闭锁模式
export const getStationModelsList= (data) => {
    return request({
        url: '/station/block/getStationModels',
        method: 'get'
    })
}
// 获取闭锁浓度
export const getAllDensitysList= (data) => {
    return request({
        url: '/station/block/getAllDensitys',
        method: 'get'
    })
}
// 查询所有模拟量测点信息
export const getlistAnalogs= (data) => {
    return request({
        url: '/combination/listAnalogs',
        method: 'post',
        data:data
    })
}
// 查询所有传感器测点
export const getlistSensorPoints= (data) => {
    return request({
        url: '/grade/listSensorPoints',
        method: 'post',
        data:data
    })
}
// 查询所有馈电测点
export const getoutagelistSensorPoints= (data) => {
    return request({
        url: '/power/outage/listFeedPoints',
        method: 'post',
        data:data
    })
}
// 查询模拟量
export const getlistSimulatePoints= (data) => {
    return request({
        url: '/calibration/listSimulatePoints',
        method: 'post',
        data:data
    })
}
// 查询传感器
export const getlistSensorName= (data) => {
    return request({
        url: '/calibration/listSensorName',
        method: 'post',
        data:data
    })
}
// 获取签名类型
export const getgetSignatureType= (data) => {
    return request({
        url: '/signature/getSignatureType',
        method: 'get'
    })
}
// 查询所有的报警类型
export const getvoicelistAlarmTypes= (data) => {
    return request({
        url: '/voice/alarm/listAlarmTypes',
        method: 'get'
    })
}
// 查询报警类型
export const getvoicevoiceAlarmTypes= (data) => {
    return request({
        url: '/voice/alarm/voiceAlarmTypes',
        method: 'get'
    })
}
// 获取查询历史的测点名称
export const getinfosearchlistSwitch= (data) => {
    return request({
        url: '/combination/listSwitch',
        method: 'post',
        data:data
    })
}
// 获取模拟量名称
export const getinfolistSensorNames= (data) => {
    return request({
        url: '/simulate/history/listSensorNames',
        method: 'get'
    })
}
// 获取开关量名称
export const getinfolistSwitchNames= (data) => {
    return request({
        url: '/combination/listSwitchNames',
        method: 'get'
    })
}
// 获取累计量名称
export const getinfogainAddNames= (data) => {
    return request({
        url: '/hisPointFault/gainAddNames',
        method: 'get'
    })
}
// 获取瓦斯抽放测点
export const getinfopumpNames= (data) => {
    return request({
        url: '/simulate/history/pumpNames',
        method: 'get'
    })
}
// 获取原因类型
export const getrealPointType= (data) => {
    return request({
        url: '/realPointType/list',
        method: 'post',
        data:data
    })
}
// 获取列表设置刷新间隔时间
export const getattainDataList= (data) => {
    return request({
        url: '/page/edit/attainDataList',
        method: 'get'
    })
}